package controllers

import (
	"goweb/modules/user/service"

	"github.com/labstack/echo"
)

func (this *Class) Login(c echo.Context) error {
	//this.Context = c
	p := new(service.Params)
	if err := c.Bind(p); err != nil {
		return err
	}
	err := service.Login(p)

	// r := new(Resp)
	// r.Errno = "100"
	// r.Data = p
	// return c.String(http.StatusOK, "Hello, World!")
	return this.Fail(1, err)
}
